const mutations = {
  // type(事件类型)： 其值为setResturantName
  // payload：官方给它还取了一个高大上的名字：载荷，其实就是一个保存要传递参数的容器
  setResturantName: (state, payload) => {
    state.resturantName = payload.resturantName;
  },
  setUsername: (state, payload) => {
    state.username = payload.username;
  },
	setid: (state, payload) => {
			state.id = payload.id;
		},
		setttId: (state, payload) => {
			state.ttId = payload.ttId;
		},
  clear: (state, payload) => {
    for (let attrName in state) {
      console.log(attrName);
      //state.username
      state[attrName] = null
    }
  }
};
export default mutations;
